﻿@using Lib.core;
@using Lib.helper;

@using Bll;
@using Model.Sys;
@{
    Layout = null;

    var list = GetModel<List<MessageModel>>("list");
}

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!-- header page -->
    @Html.Partial(IncludePath("header"))
</head>

<body>
    @Html.Partial(IncludePath("body_top"))

    <div class="container-fluid" style="margin-top:20px;">
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    @if (ValidateHelper.IsPlumpList(list))
                    {
                        <table class="table table-hover table-responsive">
                            <thead>
                                <tr>
                                    <td style="width:70%;"></td>
                                    <td></td>
                                    <td></td>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach (var model in list)
                                {
                                    <tr>
                                        <td>@(model.Title)</td>
                                        <td>@(DateTimeHelper.GetFriendlyDateTime(model.UpdateTime))</td>
                                        <td>
                                            <button data-id="@(model.UID)" class="btn btn-x btn-sm">删除</button>
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    }
                    else
                    {
                        <div class="alert alert-danger">没有消息</div>
                    }
                </div>
            </div>
        </div>
    </div>

    @Html.Partial(IncludePath("body_bottom"))
</body>
</html>
